package com.stage.annotation;

/**
 * Created by Stage on 2017/3/7.
 */
@Label("人")
public class Person implements IPerson {
    @Label("姓名")
    @Column(value = @Label("姓名"), minLength = 5, maxLength = 25)
    @Mapping(name = "Name", type = "NVARCHAR(16)")
    private String name;
    @Column(value = @Label("年龄"), minValue = 2, maxValue = 500)
    @Label("年龄")
    @Mapping(name = "Age", type = "INTEGER")
    private Integer age;
    @Label("身份信息")
    @Mapping(name = "IdNo", type = "NVARCHAR(20)")
    private String idNo;

    @Label("性别")
    @Mapping(name = "Gender", type = "NVARCHAR(4)")
    private String gender;

    @Label("是否结婚")
    @Mapping(name = "Merried", type = "BIT")
    private Boolean Merried;



    public Person() {

    }

    public Person(String idNo) {
        this.idNo = idNo;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    public Boolean isMerried() {
        return Merried;
    }

    public void setMerried(Boolean merried) {
        Merried = merried;
    }

    public void showMe() {
        System.out.println(this.name);
    }

}
